package operation;

import Medicine.Pharmacy;
// 退出系统
public class ExitSystem implements IOPeration{
    @Override
    public void work(Pharmacy pharmacy) {
        System.out.println("注意: 退出系统....");
        int currSize = pharmacy.getUsedSize();
        for (int i = 0; i < currSize; i++) {
            pharmacy.setMedicines(i,null);
        }
        pharmacy.setUsedSize(0);
        System.exit(0);
    }
}
